#一行代码实现99乘法表
# for i in range(1,10):
#     for j in range(1,i+1):
#         print('{}x{}={}'.format(j,i,i*j),end=' ')
#     print()

#以空格内层拼接后外层换行拼接，两个for循环计算顺序从右到左
print('\n'.join([' '.join('{}x{}={}'.format(j, i, i * j) for j in range(1, i + 1)) for i in range(1, 10)]))



